package com.iflytek.springboot_medicine.controller;

import com.iflytek.springboot_medicine.service.impl.DeepseekImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/deepseek")
public class DeepseekController {

    @Autowired
    DeepseekImpl deepseek;

    @PostMapping("/ask")
    public String send(@RequestBody String question) {
        return deepseek.ask(question);
    }
}
